<template>
	    <view>
	        <web-view  :src="url" ></web-view>
			
	    </view>
</template>

<script>
	export default {
			components: {},
			data() {
				return {
					url: ''
				}
			},
			onLoad(option) {
				let that = this;
				console.log(option);
				let encodeweburl = option.weburl;
				that.url = decodeURIComponent(encodeweburl);//接收返回的数据
				//console.log("encodeweburl"+encodeweburl);
				// 判断链接是否为空
				if (that.url == null) {
					return false;
				}
				// 判断链接是否为https
				let notS = this.url.split(':')[0];
				let a = notS.indexOf('s') > -1;
				if (a == false) {
					return false;
				}
				//条件编译
				//#ifdef MP-WEIXIN
				var typefrom = 'wechat';
				//#endif
				//#ifdef MP-BAIDU
				var typefrom = 'baidu';
				//#endif
				//#ifdef MP-ALIPAY
				var typefrom = 'ali';
				//#endif
				//#ifdef APP-PLUS
				var typefrom = 'APP';
				//#endif
				//  链接拼接编码网址（同时用模板字符串放置所需要的数据）
				/* url = url + `?typefrom=${typefrom}`
				uni.navigateTo({
					url: url
				}); */
			},
			onShow() {},
			methods: {},
			mounted(){}
			
		}
</script>

<style>
</style>
